Carbon


CopyRgn

Header: Quickdraw.h Carbon status: Supported

Makes a copy of a region.

void CopyRgn (
     srcRgn, 
     dstRgn
);
Parameter descriptions
srcRgn

A handle to the region to copy.

dstRgn

A handle to the region to receive the copy.

DISCUSSION

The CopyRgn function copies the mathematical structure of the region whose handle you pass in the srcRgn parameter into the region whose handle you pass in the dstRgn parameter; that is, CopyRgn makes a duplicate copy of srcRgn. When calling CopyRgn, pass handles that have been returned by the NewRgn function in the srcRgn and dstRgn parameters.

Once this is done, the region indicated by srcRgn may be altered (or even disposed of) without affecting the region indicated by dstRgn. The CopyRgn function does not create the destination region; space must already have been allocated for it by using the NewRgn function.

SPECIAL CONSIDERATIONS

The CopyRgn function may move or purge memory blocks in the application heap; do not call this function at interrupt time.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)